self.onmessage = (e) => {
  console.log("worker");
  let arr = getData();
  console.log(arr);

  self.postMessage(arr.splice(0, 10000));
};
function getData() {
  let arr = [];
  for (let i = 0; i < 10000000; i++) {
    arr.push({
      id: i + 1,
      date: "2016-05-03",
      name: "Tom",
      address: "No. 189, Grove St, Los Angeles",
    });
  }
  return arr;
}
